<script setup lang="ts">
	import { onLaunch, onShow, onHide } from "@dcloudio/uni-app";
	import modifyNavigationBarStyle from '@/utils/modifyNavigationBarStyle'
	import { onMounted } from "vue";

	onLaunch(() => {

		const naviArr = [
			'navigateTo',
			'redirectTo',
			'reLaunch',
			'switchTab',
			'navigateBack',
		]
		for (let i of naviArr) {
			uni.addInterceptor(i, {
				//监听跳转
				success(e) {
					// 修改导航条
					void modifyNavigationBarStyle(0)
				},
			})
		}
	});

	onShow(() => {

	});
	onHide(() => { });

	onMounted(() => {
		// 修改导航条
		void modifyNavigationBarStyle(200)
	})
</script>


<style lang="scss">
	/* 注意要写在第一行，同时给style标签加入lang="scss"属性 */
	@import "@/uni_modules/uview-plus/index.scss";
	@import "nutui-uniapp/styles/index";
	/* 适配tailwindcss */
	@import url("@/style/tailwindcss.css");
</style>